<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/3 0003
 * Time: 00:16
 */
for ($i = 27; $i <= 31; $i++) {
//    echo gmstrftime("%Y-%m-%d (%V %G %A)\n",gmmktime(0,0,0,12 ,$i ,2004));
}
for ($i = 1; $i <= 6; $i++) {
//    echo gmstrftime("%Y-%m-%d (%V %G %A)\n",gmmktime(0,0,0,1 ,$i ,2005));
}
//2004-12-27 (53 2004 Monday)
//2004-12-28 (53 2004 Tuesday)
//2004-12-29 (53 2004 Wednesday)
//2004-12-30 (53 2004 Thursday)
//2004-12-31 (53 2004 Friday)
//2005-01-01 (53 2004 Saturday)
//2005-01-02 (53 2004 Sunday)
//2005-01-03 (01 2005 Monday)
//2005-01-04 (01 2005 Tuesday)
//2005-01-05 (01 2005 Wednesday)
//2005-01-06 (01 2005 Thursday)
//循环开始时间
$ts = mktime(0, 0, 0, 10, 31, 2004);
for ($i = 0; $i < 4; $i++) {
    echo date("Y-m-d (H:i:s)\n", $ts);
    $ts += (24 * 60 * 60); //加24小时
}
//2004-10-31 (00:00:00)
//2004-11-01 (00:00:00)
//2004-11-02 (00:00:00)
//2004-11-03 (00:00:00)


for ($i = 0; $i < 4; $i++) {
    $ts = mktime(0, 0, 0, 10, 31+$i, 2004);
    echo date("Y-m-d (H:i:s)\n", $ts);
}
//2004-10-31 (00:00:00)
//2004-11-01 (00:00:00)
//2004-11-02 (00:00:00)
//2004-11-03 (00:00:00)